<?php

namespace Part01_SimpleFactoryMode\Code3;

/**
 * 客户端代码
 */
include_once '../../autoload.php';

$numA = $_POST['numA'];
$operate = $_POST['operate'];
$numB = $_POST['numB'];
if (!$numA || !$numB || !$operate) {
    echo '缺少必要参数';
    die;
}

$result = Operation::getResult($numA, $numB, $operate);
echo "结果是" . $result;
